<?php

namespace pam\Form;

/**
 * Description of ResearchFieldset
 *
 * @author Robert Bwana
 */

use Zend\Form\Fieldset;
use pam\Model\Research;
use Zend\Stdlib\Hydrator\ClassMethods;

class ResearchFieldset extends Fieldset{
    public function __construct($name = null, $options = array()) {
        parent::__construct($name, $options);

        $this->setHydrator(new ClassMethods(FALSE));
        $this->setObject(new Research);

        $this->add(array(
            'type' => 'hidden',
            'name' => 'id'
        ));

        $this->add(array(
            'type' => 'text',
            'name' => 'research_title',
            'options' => array(
                'label' => 'Title of Research',
            )
        ));

        $this->add(array(
            'type' => 'Zend\Form\Element\DateSelect',
            'name' => 'research_date',
            'options' => array(
                'label' => 'Research Date'
            )
        ));

        $this->add(array(
            'type' => 'textarea',
            'name' => 'research_description',
            'options' => array(
                'label' => 'Research Description'
            )
        ));
        
        $this->add(array(
            'type' => 'textarea',
            'name' => 'action_recommended',
            'options' => array(
                'label' => 'Action Recommended'
            )
        ));
        
        $this->add(array(
            'type' => 'text',
            'name' => 'recommendation_status',
            'options' => array(
                'label' => 'Recommendation Status'
            )
        ));
    }
}
